import request from '@/utils/request'

// 查询所有订单列表
export function listOrders(query) {
  return request({
    url: '/manage/orders/list',
    method: 'get',
    params: query
  })
}

// 查询所有订单详细
export function getOrders(ID) {
  return request({
    url: '/manage/orders/' + ID,
    method: 'get'
  })
}

// 新增所有订单
export function addOrders(data) {
  return request({
    url: '/manage/orders',
    method: 'post',
    data: data
  })
}

// 修改所有订单
export function updateOrders(data) {
  return request({
    url: '/manage/orders',
    method: 'put',
    data: data
  })
}

// 删除所有订单
export function delOrders(ID) {
  return request({
    url: '/manage/orders/' + ID,
    method: 'delete'
  })
}

export function orderBindManagerWriter(data) {
  return request({
    url: '/manage/orderDistribute/bindManagerWriter',
    method: 'post',
    data: data
  })
}

export function orderUnBindWriter(data) {
  return request({
    url: '/manage/orderDistribute/writerUnbind',
    method: 'post',
    data: data
  })
}
